﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SiteUnity.Layers.Entity.PageItems.Files;
using SiteUnity.Layers.Entity.General;

namespace SiteUnity.Frame.Modules.Gallery.Slider
{
    public class PageItem : Page
    {
        public new string Url { get; set; }
        public string ImageUrl { get; set; }

        public PageItem() { }

        public PageItem(Page page)
        {
            setProperties(page, string.Empty);
        }

        public PageItem(Page page, string pageUrl)
        {
            setProperties(page, pageUrl);
        }

        private void setProperties(Page page, string pageUrl)
        {
            this.ChildPages = page.ChildPages;
            this.Date = page.Date;
            this.Guid = page.Guid;
            this.ParentGuid = page.ParentGuid;
            this.ParentPage = page.ParentPage;
            this.Title = page.Title;
            this.typeID = page.typeID;
            this.Url = page.Url;
        }
    }
}
